const fs = require('fs');

// 将异步任务转换为promise的模块
const promisify = require('util').promisify;

let readfile = promisify(fs.readFile);

async function run() {
    let r1 = await readfile('./1.txt', 'utf8');
    let r2 = await readfile('./2.txt', 'utf8');
    let r3 = await readfile('./3.txt', 'utf8');
    console.log(r1);
    console.log(r2);
    console.log(r3);
};

run();